// pages/profeSCSJ/profeSCSJ.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    time: 60,
    isTimeout: false,
    isTimeDisable: false,
    isyf: true,
  },

  yesYf:function(){
    var that = this;
    that.setData({
      isyf:true
    })
  },

  noYF: function () {
    var that = this;
    that.setData({
      isyf: false
    })
  },

  // 计时器
  settime: function () {
    var that = this;
    var countdown = that.data.time;
    if (countdown == 1) {
      that.setData({
        // 60s走完恢复【获取验证码】+ 可点击
        isTimeout: false,
        isTimeDisable: false,
        time: 60,
      });
    } else {
      that.setData({
        time: countdown - 1,
      });
      setTimeout(function () {
        that.settime()
      }, 1000)
    }
  },
  // 获取验证码
  getCode: function () {
    var that = this;
    that.setData({
      isTimeout: true,
      isTimeDisable: true,
    })
    // 倒计时啦
    that.settime();
  },

  next: function () {
    // wx.showToast({
    //   icon: 'none',
    //   title: '信息填写不完整',
    // })
    wx.navigateTo({
      url: '../profeQRXX/profeQRXX',
    })
  },
})